package com.jadcon.bedbreakfast.domain;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("reservation")
public class Reservation {

	private List<Reservation> reservationList = new ArrayList<Reservation>();
	private int reservationNumber;
	private int totalNumberOfGuests;
	private int roomNumber;
	private Date checkIn;
	private Date checkOut;
	private String username;

	public Reservation() {
	}

	Reservation(int reservationNumber, int roomNumber, int totalNumberOfGuests,
			Date checkIn, Date checkOut, String username) {
		this.reservationNumber = reservationNumber;
		this.roomNumber = roomNumber;
		this.totalNumberOfGuests = totalNumberOfGuests;
		this.checkIn = checkIn;
		this.checkOut = checkOut;
		this.username = username;
	}
	
	
	public List<Reservation> getReservationList() {
		return reservationList;
	}

	public void setReservationList(List<Reservation> reservationList) {
		this.reservationList = reservationList;
	}

	public int getReservationNumber() {
		return reservationNumber;
	}

	public void setReservationNumber(int reservationNumber) {
		this.reservationNumber = reservationNumber;
	}

	public int getTotalNumberOfGuests() {
		return totalNumberOfGuests;
	}

	public void setTotalNumberOfGuests(int totalNumberOfGuests) {
		this.totalNumberOfGuests = totalNumberOfGuests;
	}

	public int getRoomNumber() {
		return roomNumber;
	}

	public void setRoomNumber(int roomNumber) {
		this.roomNumber = roomNumber;
	}

	public Date getCheckIn() {
		return checkIn;
	}

	public void setCheckIn(Date checkIn) {
		this.checkIn = checkIn;
	}

	public Date getCheckOut() {
		return checkOut;
	}

	public void setCheckOut(Date checkOut) {
		this.checkOut = checkOut;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getCheckInAsString() {
		SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy");
		String checkIn = sdf.format(getCheckIn());
		return checkIn;
	}

	public String getCheckOutAsString() {
		SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy");
		String checkOut = sdf.format(getCheckOut());
		return checkOut;
	}

	
}
